package com.kehutong.payfees.service.worker;

import com.kehutong.payfees.entity.ChargeBill;
import com.kehutong.payfees.entity.ChargeBillItem;
import org.coraframework.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

public class BillGenerate {
	
	private BillGenerate(List<JSONObject> houseList) {
		this.houseList = houseList;
		this.billList = new ArrayList<>(512);
		this.billItemList = new ArrayList<>();
	}
	
	private final List<JSONObject> houseList;
	private final List<ChargeBill> billList;
	private final List<ChargeBillItem> billItemList;

	public List<JSONObject> getHouseList() {
		return houseList;
	}
	
	public List<ChargeBill> getBillList() {
		return billList;
	}
	
	public void addBill(ChargeBill bill) {
		this.billList.add(bill);
	}

	public List<ChargeBillItem> getBillItemList() {
		return billItemList;
	}
	
	public void addBillItem(ChargeBillItem billItem) {
		this.billItemList.add(billItem);
	}

	public static BillGenerate create(List<JSONObject> houseList) {
		return new BillGenerate(houseList);
	}
}
